home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / dejagnu.lha / dejagnu-1.0.1 / tcl / doc / Concat.3 < prev    next >
Text File  |  1993-02-14  |  2KB  |  54 lines

  1. '\"
  2. '\" Copyright 1989 Regents of the University of California
  3. '\" Permission to use, copy, modify, and distribute this
  4. '\" documentation for any purpose and without fee is hereby
  5. '\" granted, provided that this notice appears in all copies.
  6. '\" The University of California makes no representations about
  7. '\" the suitability of this material for any purpose.  It is
  8. '\" provided "as is" without express or implied warranty.
  9. '\" 
  10. .so man.macros
  11. .HS Tcl_Concat tcl
  12. .BS
  13. .SH NAME
  14. Tcl_Concat \- concatenate a collection of strings
  15. .SH SYNOPSIS
  16. .nf
  17. \fB#include <tcl.h>\fR
  18. .sp
  19. char *
  20. \fBTcl_Concat\fR(\fIargc, argv\fR)
  21. .SH ARGUMENTS
  22. .AP int argc in
  23. Number of strings.
  24. .AP char *argv[] in
  25. Array of strings to concatenate.  Must have \fIargc\fR entries.
  26. .BE
  27.  
  28. .SH DESCRIPTION
  29. .PP
  30. \fBTcl_Concat\fR is a utility procedure used by several of the
  31. Tcl commands.  Given a collection of strings, it concatenates
  32. them together into a single string, with the original strings
  33. separated by spaces.  This procedure behaves differently than
  34. \fBTcl_Merge\fR, in that the arguments are simply concatenated:
  35. no effort is made to ensure proper list structure.
  36. .VS
  37. However, in most common usage the arguments will all be proper
  38. lists themselves;  if this is true, then the result will also have
  39. proper list structure.
  40. .PP
  41. \fBTcl_Concat\fR eliminates leading and trailing white space as it
  42. copies strings from \fBargv\fR to the result.  If an element of
  43. \fBargv\fR consists of nothing but white space, then that string
  44. is ignored entirely.  This white-space removal was added to make
  45. the output of the \fBconcat\fR command cleaner-looking.
  46. .VE
  47. .PP
  48. The result string is dynamically allocated
  49. using \fBmalloc()\fR;  the caller must eventually release the space
  50. by calling \fBfree()\fR.
  51.  
  52. .SH KEYWORDS
  53. concatenate, strings
  54.